package com.atguigu.ssyx.user.api;

import com.atguigu.ssyx.user.service.UserService;
import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * ClassName: LeaderAddressApiController
 * Package: com.atguigu.ssyx.user.api
 * Description:
 *
 * @Author: 比特张
 * @Create: 2023/7/22 - 16:14
 * @Version: v1.0
 */
@Api(tags = "团长接口")
@RestController
@RequestMapping("/api/user/leader")
public class LeaderAddressApiController {
    @Resource
    private UserService userService;

    @ApiOperation("根据userid获取提货点地址和团长信息")
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable(value = "userId") Long userId) {
        LeaderAddressVo leaderAddressByUserId = userService.getLeaderAddressByUserId(userId);
        return leaderAddressByUserId;
    }
}
